package org.file5.domain;

import org.compass.annotations.Searchable;
import org.compass.annotations.SearchableProperty;
import org.springframework.web.multipart.MultipartFile;

import com.google.appengine.api.datastore.Blob;
import com.google.appengine.api.datastore.Text;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.NotSaved;

@Searchable(alias = "Person")
public class Person  extends BaseEntity {

	/**
	 *  
	 */
	private static final long serialVersionUID = -2973218475949859575L;


	@SearchableProperty(name = "name")
	private String name;

	@SearchableProperty(name = "email")
	private String email;

	@SearchableProperty(name = "blogUrl")
	private String blogUrl;//主力博客站址
 
	@SearchableProperty(name = "blogJid")
	private String blogJid; ////主力博客站址JID,An XMPP address, also known as a "JID,"

	@SearchableProperty(name = "signature")
	private String signature;


	@SearchableProperty(converter = "textConverter", name = "longDesc")
	private Text longDesc;

	private Key<Category> primaryCategoryKey;


	private Blob avatarIcon;

	// used to store fileBytes from the HTML form
	@NotSaved
	private MultipartFile multipartFile;


	public Person() {
	}


	// -------------/BaseEntity Fields------------
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}






	public Blob getAvatarIcon() {
		return avatarIcon;
	}


	public void setAvatarIcon(Blob avatarIcon) {
		this.avatarIcon = avatarIcon;
	}


	public String getLongDesc() {
		return (longDesc == null) ? "" : longDesc.getValue();
	}

	public void setLongDesc(String longDesc) {
		this.longDesc = new Text((longDesc == null) ? "" : longDesc);
	}



	public Key<Category> getPrimaryCategoryKey() {
		return primaryCategoryKey;
	}


	public void setPrimaryCategoryKey(Key<Category> primaryCategoryKey) {
		this.primaryCategoryKey = primaryCategoryKey;
	}


	public String getBlogUrl() {
		return blogUrl;
	}


	public void setBlogUrl(String blogUrl) {
		this.blogUrl = blogUrl;
	}




	public String getSignature() {
		return signature;
	}


	public void setSignature(String signature) {
		this.signature = signature;
	}


	public MultipartFile getMultipartFile() {
		return multipartFile;
	}


	public void setMultipartFile(MultipartFile multipartFile) {
		this.multipartFile = multipartFile;
	}


	public String getEmail() {
		return email;
	}


	public void setEmail(String email) {
		this.email = email;
	}


	public String getBlogJid() {
		return blogJid;
	}


	public void setBlogJid(String blogJid) {
		this.blogJid = blogJid;
	}



	



}
